{extend name="base" /} {block name="body"}
<div class="layui-body">
	<div class="navbar">
		<a><cite>抽奖活动</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>奖品设置</cite></a>
	</div>
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">奖品设置</li>
			<li class="">
				<a href="{:url('prize/add')}">添加奖品</a>
			</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form layui-form-pane" action="{:url('prize/index')}" method="get">
				<div class="layui-inline">
					<label class="layui-form-label">关键词</label>
					<div class="layui-input-inline">
						<input type="text" name="keyword" value="{$keyword}" placeholder="请输入关键词" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<select name="ziduan">
						<option value="id" {if $ziduan=='id' }selected{/if}>奖品ID</option>
						<option value="name" {if $ziduan=='name' }selected{/if}>奖品名称</option>
					</select>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">排序</label>
					<div class="layui-input-inline">
						<select name="param">
							<option value="add_time" {if $param=='add_time' }selected{/if}>创建时间</option>
							<option value="sort" {if $param=='sort' }selected{/if}>排序</option>
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<select name="sort">
						<option value="asc" {if $sort=='asc' }selected{/if}>从低到高</option>
						<option value="desc" {if $sort=='desc' }selected{/if}>从高到底</option>
					</select>
				</div>
				<div class="layui-inline">
					<button class="layui-btn">搜索</button>
				</div>
			</form>
			<hr>
			<table class="layui-table">
				<thead>
					<tr>
						<th>ID</th>
						<th>奖品名称</th>
						<th>信息说明</th>
						<th>创建时间</th>
						<th>排序</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{foreach name="prize_list" item="vo"}
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.name}</td>
						<td>{$vo.desc}</td>
						<td>{$vo.add_time}</td>
						<td>{$vo.sort}</td>
						<td>
							<a href="{:url('prize/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-small">编辑</a>
							<a ref="delete_item?id={$vo.id}" class="layui-btn layui-btn-danger layui-btn-small confirm">删除</a>
						</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
			<!--分页-->
			{$prize_list->render()}
		</div>
	</div>
</div>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "{$controller}/index"
	};
</script>
{/block}